package io.sage.modules.statistics.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import io.sage.modules.statistics.vo.BStatisVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import io.sage.modules.statistics.dao.BStatisticsNoiseMapper;
import io.sage.modules.statistics.entity.BStatisticsNoise;
import io.sage.modules.statistics.service.BStatisticsNoiseService;

/**
 * 传感器噪音服务
 * @author xjh
 *
 */
@Service("statisticsNoiseService")
public class BStatisticsNoiseServiceImpl implements BStatisticsNoiseService {

	@Autowired
	private BStatisticsNoiseMapper statisticsNoiseMapper;

	@Override
	public BStatisticsNoise selectById(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void deleteBatchIds(List<Integer> asList) {
		// TODO Auto-generated method stub

	}

	@Override
	public List<BStatisticsNoise> selectStatisticsNoiseList(Map<String, Object> params) {
		// TODO Auto-generated method stub
		return statisticsNoiseMapper.selectStatisticsNoiseList(params);
	}

	@Override
	public int insert(BStatisticsNoise statisticsNoise) {
		statisticsNoise.setCreateTime(new Date());
		statisticsNoise.setIsDeleted(0);
		statisticsNoise.setIsUsed(1);
		return statisticsNoiseMapper.insertSelective(statisticsNoise);
	}

	@Override
	public int saveNoiseList(List<BStatisticsNoise> list) {

		return statisticsNoiseMapper.saveNoiseList(list);
	}

	@Override
	public List<BStatisVo> selectListByWarehouseId(Map params) {
		return statisticsNoiseMapper.selectListByWarehouseId(params);
	}

}
